<template>
	<view>
		<swiper autoplay="true" indicator-dots="true" circular="true" style="height: 422upx;padding:20upx;background-color: #fff;">
			<swiper-item v-for="(item,i) in list" :key="i" @click="jumptomenu(item)">
				<image :src="item"  style="height: 422upx;width: 100%;border-radius: 10upx;" model="aspectFill" />
			</swiper-item>
		</swiper>
		<!-- 热点 -->
		<!-- <view class="uni-swiper-msg" style="padding: 12upx;width: 726upx;margin-top: 20upx;background-color: #fff;">
			<view class="uni-swiper-msg-icon" style="width: 70upx;">
				<view style="color: #b25415;padding-left: 10upx;">热点</view>
			</view>
			<image src="../../static/notification.png" style="width: 32upx;height: 32upx;margin-top: 10upx;margin-right: 12px;"
			 mode=""></image>
			<swiper vertical="true" autoplay="true" circular="true" interval="3000" class="flex">
				<swiper-item v-for="(item, index3) in list1" :key="index3">
					<navigator style="font-size: 24upx;" class="ellipsis-1">{{item}}</navigator>
				</swiper-item>
			</swiper>
		</view> -->
		
		<view style="padding: 20upx;background-color: #fff;margin-top: 20upx;">
			<view style="font-size: 38upx;font-weight: 555;">
				关于我们
			</view>
			<view style="font-size: 31upx;background-color: #F4F4F4;font-family: 'Microsoft YaHei';padding: 22upx 18upx;margin-top: 10upx;border-radius: 10upx;">
				<view>
					重庆威普易客科技有限公司坐落于重庆九龙坡区科技园。是威普和宇 科技产业联盟的核心企业，威普易客公司负责将联盟的基础科研技术进行产品级转换。
				</view>
				<view>
					威普易客就联盟关联企业的各项基础技术进行整合，交叉重叠运用。在生物、材料及智能领域开发出独特的、具有核心竞争力的产品。并通过市场运营，建立自身的营销体系，将产品提供到市场。
				</view>
			</view>
		</view>
		
		<view style="padding: 20upx;background-color: #fff;margin-top: 20upx;">
			<view style="font-size: 38upx;font-weight: 555;">
				资质专利
			</view>
			<view style="display: flex;justify-content: space-between;margin-top: 20upx;">
				<view style="border: 1upx solid #f8f8f8;">
					<view style="width: 350upx;height: 140upx;">
						<image src="../../static/004.jpg" style="width: 100%;height: 140upx;" mode=""></image>
					</view>
					<view style="text-align: center;height: 90upx;line-height: 110upx;color: #888;">
						资质专利
					</view>
				</view>
				<view style="border: 1upx solid #f8f8f8;">
					<view style="width: 350upx;height: 140upx;">
						<image src="../../static/005.jpg" style="width: 100%;height: 140upx;" mode=""></image>
					</view>
					<view style="text-align: center;height: 90upx;line-height: 110upx;color: #888;">
						专利证书
					</view>
				</view>
			</view>
		</view>
		
		<view style="padding: 20upx;background-color: #fff;margin-top: 20upx;">
			<view style="font-size: 38upx;font-weight: 555;">
				发展历程
			</view>
			<view style="font-size: 31upx;background-color: #F4F4F4;font-family: 'Microsoft YaHei';margin-top: 10upx;border-radius: 10upx;">
				<view style="padding: 22upx 18upx;">
					<view>
						2010年
					</view>
					<view>
						在德国成立威普国际（德国）股份有限公司
					</view>
					<view>
						微量元素在农业中的应用研究
					</view>
					<view>
						ROE材料研究
					</view>
				</view>
				<view style="padding: 22upx 18upx;">
					<view>
						2013年
					</view>
					<view>
						开始智慧社区系统研发
					</view>
					<view>
						微量元素技术在人体健康中的应用研究
					</view>
					<view>
						ROE材料在服装领域的应用
					</view>
				</view>
				<view style="padding: 22upx 18upx;">
					<view>
						2017年
					</view>
					<view>
						中医药技术和微量元素结合
					</view>
					<view>
						上医道元大健康项目实施
					</view>
					<view>
						“中国爱多力幸福基金”成立
					</view>
					<view>
						“中国爱多力幸福商学院”成立
					</view>
				</view>
				<view style="padding: 22upx 18upx;">
					<view>
						2018年
					</view>
					<view>
						这ROE材料在汽车领域的应用研究
					</view>
					<view>
						利用中药技术与微量元素结合在护肤品领域的应用
					</view>
					<view>
						“素绽雪”护肤品牌诞生
					</view>
				</view>
				<view style="padding: 22upx 18upx;">
					<view>
						2019年
					</view>
					<view>
						“素绽雪”品牌开始市场推广
					</view>
					<view>
						“和宇企业发展”及“和宇休息假日”合并为“和宇生物科技”
					</view>
				</view>
				<view style="padding: 22upx 18upx;">
					<view>
						2019年
					</view>
					<view>
						2020年
					</view>
					<view>
						“威普易客新零售”系统的建设完成，上线试运营
					</view>
					<view>
						“上工御品”系列产品上线
					</view>
				</view>
				
				
			</view>
			
			
			
			
			
			
			
			
		</view>
		
	</view>
</template>

<script>
	import uniIcon from '@/components/uni-icon.vue'
	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue'
	export default {
		components: {
			uniIcon,
			uniCountdown
		},
		onShareAppMessage(res) {
			if (res.from === 'button') {// 来自页面内分享按钮
			}
			if (this.pid_father == '' || this.pid_father == undefined || this.pid_father== null){
				uni.navigateTo({
					url: '../login/login'
				})
			}
			return {
				title: '百行汇商城',
				path: '/pages/home/home?pid=' + this.pid_father
			}
		},
		data() {
			return {
				list:['../../static/001.jpg','../../static/002.jpg','../../static/003.jpg'],
				list1:['天气不错','你好啊'],
				data: {},
				appversion: '',
				version: '',
				show: '',
				show2: "",
				show3:'show',
				link: "",
				dlbtn: "",
				newtext: "",
				right: '100%',
				titleNViewBackground: '', //轮播图区域
				swiperCurrent: 0,
				swiperLength: 0,
				goodsList: [],
				backgroundColor:'transpant',
				pointerevents:'auto',
				ad: true,
				video_show: true,
				adv:{},
				autoclose:'',
				picturew:[],
				picturew_row:'',
				background:'',
				muted: false,
				path: 'http://m.wpweipin.com/video.mp4',
				pid_father:'',
			};
		},
		onShow:function(){
		  
		  uni.getStorage({
		   key: 'openid',
		   success: (res) => {
		    this.openid = res.data
		   },
		   // fail: () => {
		   //  uni.navigateTo({
		   //   url: '../login/login'
		   //  });
		   // }
		  });
		 },
		onLoad: function(e) {
			// 邀请码
			if ( e.pid ) {
				uni.setStorage({
					key: 'pid',
					data: e.pid
				})
			}
			this.muted = false
			let o = this
			uni.getStorage({
				key: 'pid_father', // 个人中心页获取的分享id
				success: (res) => {
					this.pid_father = res.data
				}
			});
			uni.request({
				url: 'http://m.wpweipin.com/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&app=1',
				success: res => {
					console.log(res)
					this.data = res.data
					// 处理广告栏数据
					this.adv = res.data.adv
					if (this.adv.data != null ||  this.adv.data != undefined) {
						this.autoclose = res.data.adv.params.autoclose
						if(this.adv.status == 1) {
							setTimeout(function() {
								o.show3 = ''
							}, o.autoclose*1000);
						}
					} else {
						this.ad = false
					}
					
					for (var i in this.data) {
						if (this.data[i].id == 'menu') {
							if (this.data[i].data_temp == undefined) {
								this.data[i].style.width = 375 / this.data[i].style.rownum + 'px'
							}
						}
						if (this.data[i].id == 'picturew') {
							let obj = this.data[i].data
							var arr = []
							for (let i in obj) {
							    let o = {};
								o[i] = obj[i];
								arr.push(o[i])
							}
							// this.data[i].data = arr
							// 换一个数组存储渲染
							this.picturew = arr
							this.picturew_row = this.data[i].params.row
						}
						if (this.data[i].id == 'banner') {
							let a = this.data[i].data
							var count = 0;
							for (var i in a) {
							    if (a.hasOwnProperty(i)) {
							        count++;
							    }
							}
							this.swiperLength = count
							this.titleNViewBackground = '#ff3300';
						}
						
					}
				},
				fail: () => {},
				complete: () => {}
			});
		},
		onHide () {
			this.muted = true
		},
		methods: {
			// 页面滚动事件
			// onPageScroll(){
			// 	// if (scrollTop<=100) {
			// 	// 	this.backgroundColor = 'black'
			// 	// }
			// 	this.backgroundColor = '#C45952'
			// },
			//轮播图切换修改背景色
			swiperChange(e) {
				const index = e.detail.current;
				this.swiperCurrent = index;
				var arr = []
				for (let i in this.data[1].data) {
				    arr.push(this.data[1].data[i]); //属性
				    //arr.push(this.data[1].data[i]); //值
				}
				this.titleNViewBackground = arr[index].backgrounds;
			},
			jump() {
				uni.showModal({
				title:'提示',
				content:'功能即将开放',
				showCancel: false,
				confirmColor:"#DD524D",
					success() {
						return
					}
				})
			},
			jumptomenu(item) {
				console.log(item)
				if(item.linkurl=="" || item.linkurl== undefined) {
					uni.showModal({
					title:'提示',
					content:'即将开放',
					showCancel: false,
					confirmColor:"#DD524D",
						success() {
							return
						}
					})
					return
				}
				// 跳转到文章页
				if (item.linkurl == "../media/media") {
					uni.navigateTo({
						url: '../media/media'
					});
					return
				}
				if (item.linkurl == "../commission/qrcode/invite_code") {
					uni.navigateTo({
						url: '../commission/qrcode/invite_code'
					});
					return
				}
				if (item.linkurl == "../member/member") {
					uni.reLaunch({
						url: '../member/member'
					})
					return
				}
				if (item.linkurl.indexOf("points_mall/points_mall") != -1) { // 积分商城
					uni.navigateTo({
						url: '../../pageA/member/points_mall/points_mall'
					})
					return
				}
				if (item.linkurl == "../commission/qrcode/invite_code") {
					uni.navigateTo({
						url: '../commission/qrcode/invite_code'
					});
					return
				}
				item = item.linkurl
				let obj = {};
				let arr1 = item.split("?");
				let arr2 = arr1[1].split("&");
				for(let i=0 ; i < arr2.length; i++){
					let res = arr2[i].split("=");
					obj[res[0]] = res[1];
				}
				item = obj
				console.log(item)
				// 跳转到自定义页面
				if (item.r == "diypage") {
					uni.navigateTo({
						url: '../goods/spree/spree?id=' + item.id
					});
				}
				if (item.r == "goods.detail") {
					uni.navigateTo({
						url: '../goods/detail?goodsid=' + item.id
					});
				}
				if (item.r == "article") {
					uni.navigateTo({
						url: '../../pageA/essay/essay?essaysid=' + item.aid
					});
				}
				if (item.r == "articlecategory") {
					uni.navigateTo({
						url: '../media/media?id=' + item.id
					});
				}
				
				if (item.r == "goods") {
					uni.navigateTo({
						url: '../goods/goods?cate=' + item.cate
					});
				}
				if (item.r == "sign") {
					uni.navigateTo({
						url: '../../pageA/member/sign/sign'
					});
				}
			},
			jumpgoods(e) {
				uni.navigateTo({
					url: '../goods/detail?goodsid=' + e.currentTarget.dataset.id
				});
			},
			
		}
	}
</script>

<style lang="scss">
	page {
		background: #F1F1F1;// 页面的整体背景色
	}
	
	
	.mp-search-box{
		width: 590upx;
		height: 130upx;
		position:fixed;
		left: 0;
		top: 0;
		// top: 72upx;
		z-index: 9;
		padding: 0 80upx;
		// background-color: rgba($color: #BE473F, $alpha: 0.5);
		.ser-input{
			width: 100%;
			height: 56upx;
			margin-top: 60upx;
			line-height: 56upx;
			text-align: center;
			font-size: 28upx;
			border-radius: 20px;
			background-color: #ddd;
			border: 1px solid #ccc;
		}
	}
	
	.controls-title {
			width: 100%;
			text-align: center;
			color: #FFFFFF;
	}
	
	
	.m-t{
		margin-top: 16upx;
	}
	/* 头部 轮播图 */
	.carousel-section {
		position: relative;
		padding-top: 10px;
	
		.titleNview-placing {
			height: var(--status-bar-height);
			padding-top: 44px;
			box-sizing: content-box;
		}
	
		.titleNview-background {
			// background: #BE473F; //轮播图后面暂时的静态背景色
			opacity: 0.9;
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 426upx;
			transition: .4s;
		}
	}
	.carousel {
		width: 100%;
		height: 350upx;
		text-align: center;
	
		.carousel-item {
			width: 100%;
			height: 100%;
			overflow: hidden;
		}
	
		image {
			width: 94%; // 设置 轮播图片宽度
			height: 100%;
			border-radius: 10upx;
		}
	}
	.swiper-dots {
		display: flex;
		position: absolute;
		left: 60upx;
		bottom: 15upx;
		width: 72upx;
		height: 36upx;
		background-image: url();
		background-size: 100% 100%;
	
		.num {
			width: 36upx;
			height: 36upx;
			border-radius: 50px;
			font-size: 24upx;
			color: #fff;
			text-align: center;
			line-height: 36upx;
		}
	
		.sign {
			position: absolute;
			top: 0;
			left: 50%;
			line-height: 36upx;
			font-size: 12upx;
			color: #fff;
			transform: translateX(-50%);
		}
	}
	/* 分类 */
	.cate-section {
		display: flex;
		justify-content: space-around;
		align-items: center;
		flex-wrap:wrap;
		padding: 30upx 22upx; 
		background: #fff;
		.cate-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			// font-size: $font-sm + 2upx;
			// color: $font-color-dark;
		}
		/* 原图标颜色太深,不想改图了,所以加了透明度 */
		image {
			width: 88upx;
			height: 88upx;
			margin-bottom: 14upx;
			border-radius: 50%;
			opacity: .7;
			box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
		}
	}
	.ad-1{
		width: 100%;
		height: 210upx;
		padding: 10upx 0;
		background: #fff;
		image{
			width:100%;
			height: 100%; 
		}
	}
	.p_father {
		width: 100%;
		height: 330upx;
		display: flex;
		justify-content: space-between;
		margin-bottom: 16upx;
	}
	.p_left {
		margin: 0 10upx;
		width: 40%;
		flex: 1;
	}
	.p_left image {
		width: 100%;
		height: 100%;
	}
	.p_right {
		margin: 0 10upx;
		width: 40%;
		flex: 1;
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
	}
	.img_top {
		flex: 1;
		height: 50%;
		// height: 170upx;
		width: 100%;
	}
	.img_top image{
		width: 98%;
		height: 98%;
	}
	.img_bottom {
		flex: 1;
		height: 50%;
		// height: 170upx;
		width: 100%;
		display: flex;
	}
	.img_bottom view {
		flex: 1;
		width: 50%;
		line-height: 1;
	}
	.img_bottom view:nth-child(1) image {
		width: 98%;
		height: 98%;
		// margin: 0 4% 4% 0;
	}
	.img_bottom view:nth-child(2) image {
		width: 98%;
		height: 98%;
		// margin: 0 0% 4% 4%;
	}
	.tab_choose {
		height: 100upx;
		display: flex;
		background-color: #fff;
		color: #b71c24;
	}
	.padleft {
		color: #333;
		padding-left: 4upx;
	}
	.menu_son {
		line-height: 100upx;
		flex: 1;
		text-align: center;
	}
	.flexbox {
		display: flex;
		flex-wrap: wrap;
	}
	.flexboxson {
		width: 25%;
	}
	.block {
		padding: 8upx;
	}

	.item {
		float: left;
		width: 50%;
		padding: 10upx;
		box-sizing: border-box;
	}

	.one .item {
		width: 100%;
	}

	.three .item {
		width: 33.33%;
	}

	.triangle {
		width: 100%;
		height: 346upx;
		display: block;
	}

	.one .triangle {
		height: 714upx
	}

	.three .triangle {
		height: 224upx
	}

	.detail {
		background: #fff;
		padding: 20upx 12upx;
	}

	.name {
		height: 68upx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		font-size: 24upx;
		line-height: 36upx;
	}

	.price text {
		display: block;
		line-height: 40upx;
	}

	.price {
		margin-top: 12upx;
		color: #b71c24;
	}

	.mask {
		position: fixed;
		z-index: 998;
		top: 0;
		right: 0;
		left: 0;
		bottom: 0;
		// background: rgba(0, 0, 0, .6);
	}

	.mask,
	.tips {
		display: none;
	}

	.mask.show,
	.gengxing.show {
		display: block !important;
	}
	.gengxing {
		position: fixed;
		z-index: 99999;
		width: 480upx;
		height: 738upx;
		top: 50%;
		left: 50%;
		margin-left: -240upx;
		margin-top: -380upx;
		background-size: cover;
		display: none;
		overflow: hidden;
	}

	.gengxing .title {
		position: absolute;
		top: 340upx;
		text-align: center;
		color: #db3737;
		font-size: 40upx;
		font-weight: 600;
		width: 220upx;
		left: 50%;
		margin-left: -110upx;
		line-height: 44upx;
		z-index: 999;
	}

	.gengxing .title text {
		font-weight: initial;
		font-size: 24upx;
		color: #fff;
		background: #db3737;
		border-radius: 100upx;
		padding: 0 10upx;
		position: absolute;
		line-height: 36upx;
		bottom: 0;
		left: 100%;
		z-index: 999;
	}

	.dl {
		position: absolute;
		bottom: 0;
		background: transparent;
		font-size: 34upx;
		width: 100%;
		color: #fff;
		line-height: 100upx;
		z-index: 999;
	}
	
	
	.d-header{
		display: flex;
		justify-content: center;
		align-items: center;
		height: 80upx;
		// font-size: $font-base + 2upx;
		// color: $font-color-dark;
		position: relative;
			
		text{
			padding: 0 20upx;
			background: #fff;
			position: relative;
			z-index: 1;
		}
		&:after{
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translateX(-50%);
			width: 300upx;
			height: 0;
			content: '';
			border-bottom: 1px solid #ccc;
		}
	}
</style>
